package com.example.map;

import java.util.HashMap;
import java.util.Set;

public class MapTest {
    public static void main(String[] args) {
        var staff = new HashMap<String, Employee>();
        staff.put("144-25-5464", new Employee("Amy Lee"));
        staff.put("567-24-2546", new Employee("Harry Hacker"));
        staff.put("157-62-7953", new Employee("Gary Cooper"));
        staff.put("456-62-5527", new Employee("Francesca Cruz"));

        Set<String> keys = staff.keySet();
        for(String key : keys){
            System.out.println(key);
        }

        for(var entry : staff.entrySet()){
            String k = entry.getKey();
            Employee v = entry.getValue();
            System.out.println(k);
            System.out.println(v);
            System.out.println();
        }

        System.out.println("=====");
        staff.forEach((k, v) -> {
            System.out.println(k);
            System.out.println(v);
            System.out.println("");
        });
    }
}
